package com.niit.session15;

public class UserService {
	public void register(String username,String password,String email,String phone) {
		boolean isEmail = Validate.isEmail(email);
		if(!isEmail) {
			System.out.println("邮箱不符合规范！");
			return;
		}
		if(!Validate.isPhone(phone)) {
			System.out.println("手机号不符合规范！");
			return;
		}
		System.out.println("注册成功！");
		
	}
	
	public static void main(String[] args) {
		UserService userService = new UserService();
		userService.register("Trout", "123456", "126485152@qq.com", "13777753654");
	}

}
